<!-- 
	/**
	 * All rights Reserved, Designed By www.youyacao.com <br>
	 * @Description:设置页面 <br>
	 * @version 蜻蜓Q系统  <br>
	 * @author:成都市一颗优雅草科技有限公司  <br>
	 * 注意：使用我司开源源代码请遵循license文件的协议仅供个人非盈利使用，禁止用于其他的商业用途
	 * 需要商业用途或者定制开发等可访问songshu.youyacao.com  联系QQ:2853810243 422108995 23625059584
	 * 正版系统查询系统 zhengbancha.youyacao.com
	 */
 -->
<template>
	<view class="setting_page">
		<view class="setting_head">
			<image src="@/static/xinjiang/logo_mini.png" mode="aspectFit" class="setting_logo"></image>
			<view class="setting_name">XXX精彩视界v.1.2</view>
		</view>
		<!-- <u-cell-group>
			<u-cell-item title="退出" @click="_logout"></u-cell-item>
			<u-cell-item title="黑名单" @click="_blacklist"></u-cell-item>
		</u-cell-group> -->
		<view class="setting_menu">
			<view class="setting_menu__item" @click="jumpTo('/pages/register/edit?is_edit=true')">
				<text class="setting_menu__title">个人资料</text>
				<image src="@/static/xinjiang/right_arrow.png" mode="aspectFit" class="setting_menu__icon"></image>
			</view>
			<view class="setting_menu__item">
				<text class="setting_menu__title">用户隐私</text>
				<image src="@/static/xinjiang/right_arrow.png" mode="aspectFit" class="setting_menu__icon"></image>
			</view>
			<view class="setting_menu__item">
				<text class="setting_menu__title">隐私政策</text>
				<image src="@/static/xinjiang/right_arrow.png" mode="aspectFit" class="setting_menu__icon"></image>
			</view>
			<!-- <view class="setting_menu__item">
				<text class="setting_menu__title">免责申明</text>
				<image src="@/static/xinjiang/right_arrow.png" mode="aspectFit" class="setting_menu__icon"></image>
			</view> -->
			<!-- <view class="setting_menu__item">
				<text class="setting_menu__title">注销账号</text>
				<image src="@/static/xinjiang/right_arrow.png" mode="aspectFit" class="setting_menu__icon"></image>
			</view> -->
			<view class="setting_menu__item">
				<text class="setting_menu__title">清除缓存</text>
				<image src="@/static/xinjiang/right_arrow.png" mode="aspectFit" class="setting_menu__icon"></image>
			</view>
			<view class="setting_menu__item">
				<text class="setting_menu__title">当前版本</text>
				<view class="setting_menu__right">
					<text class="setting_menu__version">{{ version }}</text>
					<image src="@/static/xinjiang/right_arrow.png" mode="aspectFit" class="setting_menu__icon"></image>
				</view>
			</view>
		</view>
		
		<view class="setting_logout__btn" @click="_logout">退出登录</view>
	</view>
</template>

<script>
	import {
		Logout
	} from '@/common/api.js'
	import {
		mapMutations
	} from 'vuex'

	export default {
		data() {
			return {
				version: '1.0.0'
			};
		},
		onLoad() {
			plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
				this.version = wgtinfo.version
			})
		},
		methods: {
			...mapMutations(['setPath']),
			_logout() {
				try {
					uni.setStorageSync('TOKEN', null)
					uni.setStorageSync('userinfo', null)
				} catch (e) {
					// error
				}
				this.setPath('/pages/login/login')
				uni.reLaunch({
					url: '/pages/login/login'
				})
			},
			_blacklist() {
				uni.navigateTo({
					url: '/pages/my/blacklist/blacklist'
				})
			},
			jumpTo(url) {
				uni.navigateTo({ url })
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import url("setting.scss");
</style>